export default {
  state: {
    a: 0,
    b: 0,
    c: 0,
    d: 0
  },

  mutations: {
    updata(state, { payload }) {
      // state.a += 1
      // state.b += 2
      // state.c += 3
      // state.d += 4
      // state.list = { ...state.list, ...payload }
      for (let key in payload) { state[key] = payload[key] }
    }
  },

  actions: {},

  getters: {
    getIndexStore: state => key => state[key]
  }

}
